<?php
$lang = $_REQUEST['lang'];
$codername = $_REQUEST['codername'];
$testername = $_REQUEST['testername'];
$emailtester = $_REQUEST['emailtester'];
$codeproject = $_REQUEST['codeproject'];
$codetestpro = $_REQUEST['codetestpro'];
$titletestpro = $_REQUEST['titletestpro'];
$company = $_REQUEST['company'];
$currentdate = $_REQUEST['currentdate'];
$nguoiguidi = $_REQUEST['nguoiguidi'];
$statustestpro = $_REQUEST['statustestpro'];

if (empty($lang) || $lang == "EN") {
	$value = "value/value_en.php";
} else if($lang == "VN") {
	$value = "value/value_vn.php";
}
else {
	$value = "value/value_kr.php";
}
include($value);

$namestatustestpro = "";
if ($statustestpro == 0){
	$namestatustestpro = $l_no_fix;
}else if ($statustestpro == 1){
	$namestatustestpro = $l_fix_complete;
}else if ($statustestpro == 2){
	$namestatustestpro = $l_confirm_excel;
}

require_once('class.phpmailer.php');
$mail = new PHPMailer();

$mail->IsSMTP();
$mail->SMTPDebug  = 2;
$mail->SMTPAuth   = true;
$mail->SMTPSecure = "ssl";
$mail->Host       = "smtp.gmail.com";
$mail->Port       = 465;
$mail->Username   = "elisoftmailserver@gmail.com";
$mail->Password   = "1234567892727";

$mail->SetFrom('elisoftmailserver@gmail.com',$company);
$mail->AddAddress($emailtester, $testername);

$mail->Subject    = 'Fixed bug complete:  '.$titletestpro ;
$mail->CharSet = "utf-8";
$mail->IsHTML(true);

$body ='<div style="padding-left:30px;">'.$l_from.':  '.$l_coder.': '.$codername.'     '.$l_to.':   '.$l_tester.': '.$testername.' </div>';
$body .='<br />';
$body .='<table cellpadding="0" cellspacing="0" style="border-collapse:collapse; width:600px; border:1px solid #c4c0c9">';
$body .='<tr style="background:#eee;border-bottom:1px solid #c4c0c9">';
$body .='<td style="font-weight:bold;border-right:1px solid #c4c0c9;padding:5px">'.$l_codetestpro.'</td>';
$body .='<td style="font-weight:bold;border-right:1px solid #c4c0c9;padding:5px">'.$l_status.'</td>';
$body .='<td style="font-weight:bold;border-right:1px solid #c4c0c9;padding:5px">'.$l_title.'</td>';
$body .='<td style="font-weight:bold;;padding:5px">'.$l_complete_date.'</td>';
$body .='</tr>';
$body .='<tr>';
$body .='<td style="padding:5px; border-right: 1px solid #C4C0C9;">'.$codetestpro.'</td>';
$body .='<td style="color:#FF2121;padding:5px;border-right: 1px solid #C4C0C9;">'.$namestatustestpro.'</td>';
$body .='<td style="padding:5px;border-right: 1px solid #C4C0C9;">'.$titletestpro.'</td>';
$body .='<td style="padding:5px; border-right: 1px solid #C4C0C9;">'.$currentdate.'</td>';
$body .='</tr>';
$body .='<table/>';

$mail->Body = $body;
$mail->AltBody=$dtitle;
if(!$mail->Send()) {
  //echo "Mailer Error: " . $mail->ErrorInfo;
} else {
 // echo "Message sent!";
}
?>